package com.yumi.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * 结算明细表实体类
 */
@Data
@TableName("T_LOG_TENSETTDETAIL")
@Schema(description = "结算明细信息")
public class TLogTensettdetail {

    /**
     * 交易唯一标识
     */
    @TableId
    @Schema(description = "交易唯一标识")
    private String debitSettleSeq;

    /**
     * 交易类型
     */
    @NotBlank(message = "交易类型不能为空")
    @Schema(description = "交易类型")
    private String txnType;

    /**
     * POS机编号
     */
    @NotBlank(message = "POS机编号不能为空")
    @Schema(description = "POS机编号")
    private String posId;

    /**
     * POS交易流水
     */
    @NotBlank(message = "POS交易流水不能为空")
    @Schema(description = "POS交易流水")
    private String localSeq;

    /**
     * 发卡机构代码
     */
    @Schema(description = "发卡机构代码")
    private String issOrgCode;

    /**
     * 交易卡号
     */
    @NotBlank(message = "交易卡号不能为空")
    @Schema(description = "交易卡号")
    private String cardId;

    /**
     * 消费前余额
     */
    @NotNull(message = "消费前余额不能为空")
    @Schema(description = "消费前余额")
    private Integer befBalance;

    /**
     * 消费金额
     */
    @NotNull(message = "消费金额不能为空")
    @Schema(description = "消费金额")
    private Integer debitMoney;

    /**
     * 交易日期
     */
    @NotBlank(message = "交易日期不能为空")
    @Schema(description = "交易日期")
    private String debitDate;

    /**
     * 交易时间
     */
    @NotBlank(message = "交易时间不能为空")
    @Schema(description = "交易时间")
    private String debitTime;

    /**
     * 结算日期
     */
    @NotBlank(message = "结算日期不能为空")
    @Schema(description = "结算日期")
    private String cchsSettDate;

    /**
     * 车辆编号
     */
    @Schema(description = "车辆编号")
    private String upBusId;

    /**
     * 线路编号
     */
    @Schema(description = "线路编号")
    private String upLineId;

    /**
     * 交易渠道
     */
    @Schema(description = "交易渠道")
    private String cardOrg;

    /**
     * 交易状态
     */
    @Schema(description = "交易状态")
    private String susAtt;

    /**
     * 卡类型
     */
    @Schema(description = "卡类型")
    private String childCardKind;

    /**
     * 换乘组号
     */
    @Schema(description = "换乘组号")
    private String lineBranch;

    /**
     * 处理结果码(0-成功)
     */
    @Schema(description = "处理结果码(0-成功)")
    private String cchsErrCode;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    /**
     * 是否删除(0-未删除，1-已删除)
     */
    @TableLogic
    @Schema(description = "是否删除")
    private Integer deleted;
}